﻿using Microsoft.AspNetCore.Mvc;

namespace MvcMovie.Controllers
{
    public class HelloController : Controller
    {
        //    public IActionResult Index()
        //    {
        //        return View();
        //    }

        //public String Index()
        //{
        //    return "这是Index首页方法…";
        //}
        //public IActionResult Welcome()
        //{
        //    return Content("<h3>这是Welcome方法…</h3>", "text/html; charset=utf-8");
        //}

        public IActionResult Index()
        {
            ViewData["Name"] = "小明";
            return View();
        }

        public IActionResult Welcome(string name, int n = 1)
        {
            ViewData["Message"] = "Hello " + name;
            ViewData["Count"] = n;
            return View();
        }



    }
}
